import request from '@/utils/request'

// 查询退货单列表
export function listReturnInfo(query) {
  return request({
    url: '/ReturnInfo/ReturnInfo/list',
    method: 'get',
    params: query
  })
}

// 查询退货单详细
export function getReturnInfo(returnId) {
  return request({
    url: '/ReturnInfo/ReturnInfo/' + returnId,
    method: 'get'
  })
}

// 新增退货单
export function addReturnInfo(data) {
  return request({
    url: '/ReturnInfo/ReturnInfo',
    method: 'post',
    data: data
  })
}

// 修改退货单
export function updateReturnInfo(data) {
  return request({
    url: '/ReturnInfo/ReturnInfo',
    method: 'put',
    data: data
  })
}

// 删除退货单
export function delReturnInfo(returnId) {
  return request({
    url: '/ReturnInfo/ReturnInfo/' + returnId,
    method: 'delete'
  })
}
//审批

export function approverReturn(data) {
  return request({
    url: '/ReturnInfo/ReturnInfo/approver',
    method: 'put',
    data: data
  })
}